<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <div id="app">
     <input type="text" v-model="obj.name">
    </div>
    <script src="js/vue.js"></script>
    <script>
        var vm = new Vue({
            el: '#app',
            data: {
                obj:{
                    name:'zs',
                    age:20 
                }
            },
            watch:{
                'obj.name':function(){
                    console.log('监听对象中某属性的变化')
                },
                'obj':function(){
                    console.log('监听整个对象的变化')//监听不到
                }
            }
        });
    </script>
</body>

</html>